import axios from 'axios'

//创建设备
export const createDevice = (data) => {
  return axios.put("host/create", data)
}

//修改设备
export const updateDevice = (data) => {
  return axios.post("host/update", data)
}

//获取设备组
export const getDeviceGroup = (data) => {
  return axios.get("hostGroup/get", { params: data })
}

//获取设备
export const getDevice = (data) => {
  return axios.get("host/get", { params: data })
}

//获取设备详情
export const getDeviceDetail = (data) => {
  return axios.get("host/details", { params: data })
}

//修改设备状态
//data = {hostId:1,status:1}
export const updateDeviceStatus = (data) => {
  return axios.post("host/status", data)
}
//批量修改设备状态 
//data = [{hostId:1,status:1},{hostId:2,status:1}]
export const updateDeviceStatusBatch = (data) => {
  return axios.post("host/status/batch", data)
}

//删除设备
export const deleteDevice = (data) => {
  return axios.post("host/delete", data)
}